#!/bin/bash

APISERVER="https://kubernetes.default.svc.cluster.local"

TOKEN="eyJhbGciOiJSUzI1NiIsImtpZCI6ImJPSkl1ZUtoOUd6NDRhRWpqUUdhQ0RJWFJjWjBCejNQeV9DM3hMT1N0dk0ifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImRlZmF1bHQtdG9rZW4iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGVmYXVsdCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjRjY2U0NDU3LWE2ZDYtNGIwZi1hMzZkLWU5MDc5YjZhYTYyZSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpkZWZhdWx0OmRlZmF1bHQifQ.jbl0WIPtfzgBYkZI-5rvITWVr5HH9ITxAADEO1ei5S7tWBheEZPGr3gVQXD7i0V7C1WbCt_I-yj5qroBax8ahX-Bz92QLw96ZRnxxBefpi0zD_YfgmABYEstZQ_QrdqmecSRZ1JmSptm7A0FO5t3qNthW8szLVHwGVcfVj9jO6k65mavrcds6FiVEfYuiAIGkgNwnmi8ghcmBwMWfwl_I9UDLf2u_ZuQf12UWGWyJE4TjPWp6IpKHzIGup4dL_74J1VFFQEVHiZe1lJRMbvLP7eFbtAKDAnrUPE29ubnV21RPKvmEVRzN00IEyoGI16Yp77OkYzXLy5wmfTdCeq1Zg"

# 使用令牌玩转 API
curl -X GET $APISERVER/apis --header "Authorization: Bearer $TOKEN" --insecure
